package com.zjy.pgcms.dto.user;

import com.zjy.pgcms.dto.BasicDTO;
import com.zjy.pgcms.util.ValidationUtil;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

/**
 * @author 音音音
 */
@Data
public class UserLoginDTO implements BasicDTO {
    private String username;
    private String password;
    @Override
    public Boolean paramsValidation() {
        if (StringUtils.isAnyBlank(username,password)){
            return true;
        }
        if (!ValidationUtil.usernameValidation(username)){
            return true;
        }
        if (!ValidationUtil.strongPasswordValidation(password)){
            return true;
        }
        return false;
    }
}
